<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>${article.title} - ${site.name}</title>
    <meta name="description" content="${article.articleExt.seoDescription}">
    <meta name="keywords" content="${article.articleExt.seoKeywords}">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f5f5f5;
        }

        .news-container {
            max-width: 900px;
            margin: 0 auto;
            background: white;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
        }

        .news-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            text-align: center;
        }

        .news-category {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 12px;
            margin-bottom: 15px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .news-title {
            font-size: 32px;
            font-weight: bold;
            margin-bottom: 15px;
            line-height: 1.2;
        }

        .news-subtitle {
            font-size: 18px;
            opacity: 0.9;
            margin-bottom: 20px;
        }

        .news-meta {
            display: flex;
            justify-content: center;
            gap: 25px;
            font-size: 14px;
            opacity: 0.9;
            flex-wrap: wrap;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .news-content-wrapper {
            padding: 40px;
        }

        .news-lead {
            font-size: 18px;
            color: #555;
            font-weight: 500;
            margin-bottom: 30px;
            padding: 20px;
            background: #f8f9fa;
            border-left: 4px solid #667eea;
            border-radius: 0 8px 8px 0;
        }

        .news-image {
            text-align: center;
            margin: 30px 0;
        }

        .news-image img {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        }

        .news-image-caption {
            font-size: 14px;
            color: #666;
            margin-top: 10px;
            font-style: italic;
        }

        .news-content {
            font-size: 16px;
            line-height: 1.8;
            margin-bottom: 30px;
        }

        .news-content h2 {
            color: #667eea;
            font-size: 24px;
            margin: 30px 0 15px 0;
            padding-bottom: 10px;
            border-bottom: 2px solid #e9ecef;
        }

        .news-content h3 {
            color: #555;
            font-size: 20px;
            margin: 25px 0 12px 0;
        }

        .news-content p {
            margin-bottom: 18px;
            text-align: justify;
        }

        .news-content ul,
        .news-content ol {
            margin: 20px 0;
            padding-left: 30px;
        }

        .news-content li {
            margin-bottom: 10px;
        }

        .news-content blockquote {
            border-left: 4px solid #667eea;
            padding: 20px 25px;
            margin: 25px 0;
            background: #f8f9fa;
            font-style: italic;
            position: relative;
        }

        .news-content blockquote::before {
            content: '"';
            font-size: 60px;
            color: #667eea;
            position: absolute;
            top: -10px;
            left: 15px;
            opacity: 0.3;
        }

        .news-highlight {
            background: #fff3cd;
            border: 1px solid #ffeaa7;
            padding: 15px 20px;
            border-radius: 8px;
            margin: 20px 0;
        }

        .news-highlight h4 {
            color: #856404;
            margin-bottom: 10px;
        }

        .news-footer {
            background: #f8f9fa;
            padding: 30px 40px;
            border-top: 1px solid #e9ecef;
        }

        .news-tags {
            margin-bottom: 20px;
        }

        .news-tags h4 {
            color: #555;
            margin-bottom: 10px;
            font-size: 14px;
        }

        .tag {
            display: inline-block;
            background: #667eea;
            color: white;
            padding: 6px 15px;
            border-radius: 20px;
            font-size: 12px;
            margin-right: 10px;
            margin-bottom: 8px;
            text-decoration: none;
            transition: background 0.3s;
        }

        .tag:hover {
            background: #5a6fd8;
        }

        .news-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            color: #666;
            padding-top: 20px;
            border-top: 1px solid #e9ecef;
        }

        .stats-left {
            display: flex;
            gap: 20px;
        }

        .stat-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .breadcrumb {
            background: #e9ecef;
            padding: 15px 40px;
            font-size: 14px;
        }

        .breadcrumb a {
            color: #667eea;
            text-decoration: none;
        }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

        .related-news {
            background: #f8f9fa;
            padding: 30px 40px;
            border-top: 1px solid #e9ecef;
        }

        .related-news h3 {
            color: #555;
            margin-bottom: 20px;
            font-size: 18px;
        }

        .related-item {
            display: flex;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #e9ecef;
            text-decoration: none;
            color: #333;
        }

        .related-item:hover {
            color: #667eea;
        }

        .related-item:last-child {
            border-bottom: none;
        }

        @media (max-width: 768px) {
            .news-container {
                margin: 0;
                box-shadow: none;
            }

            .news-header {
                padding: 20px;
            }

            .news-title {
                font-size: 24px;
            }

            .news-content-wrapper,
            .news-footer,
            .breadcrumb {
                padding: 20px;
            }

            .news-meta {
                flex-direction: column;
                gap: 10px;
            }

            .news-stats {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }

            .stats-left {
                justify-content: center;
            }
        }
    </style>
</head>
<body>
    <div class="news-container">
        <!-- 面包屑导航 -->
        <nav class="breadcrumb">
            <a href="/">首页</a> > 
            <a href="/portal/channel/${article.channelId}">${article.channel.name}</a> > 
            ${article.title}
        </nav>

        <!-- 新闻头部 -->
        <header class="news-header">
            <div class="news-category">${article.channel.name}</div>
            <h1 class="news-title">${article.title}</h1>
            <#if article.subtitle??>
                <p class="news-subtitle">${article.subtitle}</p>
            </#if>
            
            <div class="news-meta">
                <span class="meta-item">
                    <span>📝</span>
                    <span>${article.author!'本站编辑'}</span>
                </span>
                <span class="meta-item">
                    <span>📅</span>
                    <span>${article.publishDate?string('yyyy年MM月dd日 HH:mm')}</span>
                </span>
                <span class="meta-item">
                    <span>👁️</span>
                    <span>${article.views} 阅读</span>
                </span>
                <#if article.source??>
                    <span class="meta-item">
                        <span>📰</span>
                        <span>${article.source}</span>
                    </span>
                </#if>
            </div>
        </header>

        <!-- 新闻内容 -->
        <div class="news-content-wrapper">
            <!-- 导语 -->
            <#if article.subtitle??>
                <div class="news-lead">
                    ${article.subtitle}
                </div>
            </#if>

            <!-- 主图 -->
            <#if article.image??>
                <div class="news-image">
                    <img src="${article.image}" alt="${article.title}">
                    <div class="news-image-caption">图片来源：${article.source!'本站'}</div>
                </div>
            </#if>

            <!-- 正文内容 -->
            <div class="news-content">
                ${article.articleExt.content}
            </div>

            <!-- 重要提示框 -->
            <div class="news-highlight">
                <h4>📢 重要提示</h4>
                <p>本文内容仅供参考，具体信息请以官方发布为准。如有疑问，请联系相关部门确认。</p>
            </div>
        </div>

        <!-- 新闻底部 -->
        <footer class="news-footer">
            <!-- 标签 -->
            <#if article.tags?? && article.tags?size > 0>
                <div class="news-tags">
                    <h4>相关标签：</h4>
                    <#list article.tags as tag>
                        <a href="/portal/tag/${tag.id}" class="tag">${tag.name}</a>
                    </#list>
                </div>
            </#if>

            <!-- 统计信息 -->
            <div class="news-stats">
                <div class="stats-left">
                    <span class="stat-item">
                        <span>👍</span>
                        <span>${article.ups} 赞</span>
                    </span>
                    <span class="stat-item">
                        <span>💬</span>
                        <span>${article.comments} 评论</span>
                    </span>
                    <span class="stat-item">
                        <span>⭐</span>
                        <span>${article.favorites} 收藏</span>
                    </span>
                    <span class="stat-item">
                        <span>📥</span>
                        <span>${article.downloads} 下载</span>
                    </span>
                </div>
                <div>
                    责任编辑：${article.editor!'${article.author}'} | 最后更新：${article.updateDate?string('yyyy-MM-dd HH:mm')}
                </div>
            </div>
        </footer>

        <!-- 相关新闻 -->
        <#if relatedArticles?? && relatedArticles?size > 0>
            <div class="related-news">
                <h3>📰 相关新闻</h3>
                <#list relatedArticles as related>
                    <a href="/portal/article/${related.id}" class="related-item">
                        <span>• ${related.title}</span>
                    </a>
                </#list>
            </div>
        </#if>
    </div>
</body>
</html>
